<div class="topbar">

{% load notifications_tags %}

    <span>欢迎来到淄博王舍汽配网上商城!&nbsp;&nbsp;&nbsp;</span>

    {% if user.is_superuser %}
            {% notifications_unread as unread_count %}

        <span class="topbar-right-text">管理员，<a href="#">{{ user.username }}</a>
          [<a href="{% url 'logout' %}">退出</a>]</span>
        - <a target="_blank" rel="nofollow" href="{% url 'admin_index' %}">网站后台</a>
        <div id="shownotice" class="dropdown dropdown-unibody">
            <a class="dropdown-trigger dropdown-trigger-active" data-toggle="dropdown" hidefocus="" data-target="#shownotice" href="/custom/self/notifications/">消息<cite>{{ unread_count }}</cite><i class="arrow arrow-down"></i></a>
            <ul class="dropdown-menu clearfix">
                <li class="dropdown-menu-item"><a href="/custom/self/notifications/"><cite>{{ unread_count }}</cite>条系统提示</a></li>
            </ul>
        </div>

    {% elif user.is_staff %}

            {% notifications_unread as unread_count %}

        <span class="topbar-right-text">商户，<a href="#">{{ user.username }}</a>
          [<a href="{% url 'logout' %}">退出</a>]</span>
        - <a target="_blank" rel="nofollow" href="{% url 'admin_index' %}">商户后台</a>
        - <a target="_blank" rel="nofollow" href="#">付费推广</a>
        <div id="shownotice" class="dropdown dropdown-unibody">
            <a class="dropdown-trigger dropdown-trigger-active" data-toggle="dropdown" hidefocus="" data-target="#shownotice" href="/custom/self/notifications/">消息<cite>{{ unread_count }}</cite><i class="arrow arrow-down"></i></a>
            <ul class="dropdown-menu clearfix">
                <li class="dropdown-menu-item"><a href="/custom/self/notifications/"><cite>{{ unread_count }}</cite>条系统提示</a></li>
            </ul>
        </div>
        - <a rel="nofollow" class="tag tag-green" target="_blank" href="#" id="postAd">免费发布信息</a>

    {% elif user.is_active %}

        <span class="topbar-right-text">用户，<a href="#">{{ user.username }}</a>
          [<a href="{% url 'logout' %}">退出</a>]</span>
          <a rel="nofollow" href="{% url 'custom_page' %}">用户中心</a>&nbsp;-
          <a href="{% url 'create_need' %}" class='tag tag-green'>免费发布信息</a>
            {% notifications_unread as unread_count %}

            <div id="shownotice" class="dropdown dropdown-unibody">

                <a class="dropdown-trigger dropdown-trigger-active" data-toggle="dropdown"
                   hidefocus="" data-target="#shownotice" href="#">
                    消息{% if unread_count %}<cite>{{ unread_count }}</cite>{% endif %}
                    <i class="arrow arrow-down"></i>
                </a>

                <ul class="dropdown-menu clearfix">
                    <li class="dropdown-menu-item">
                        <a href="{% url 'custom_notify' %}"><cite>{{ unread_count }}</cite>条系统信息</a>
                    </li>
                </ul>
            </div>


    {% else %}


        <span class="topbar-right-text">
          <a href="{% url 'custom_register' %}">注册</a>&nbsp;|
          <a href="{% url 'custom_login' %}">登录</a>&nbsp;-
          <a href="{% url 'create_need' %}" class='tag tag-green'>免费发布信息</a>
        </span>



    {% endif %}
</div> <!-- .topbar -->
